clc; close all; clear all; clear classes;

load 'demo3data';

t = timer;

% Assign values to timer object properties using the set function.

set(t,'ExecutionMode','fixedRate','BusyMode','drop','Period',2);

% Assign a value to the timer object TimerFcn property using dot notation.

reader = OrderBookReader( openOptions );


t.TimerFcn = @(x,y) reader.insertOrderBook;


% Start the timer object


start(t)


% Stop the timer object.
% Delete timer objects after you are done using them.
% stop(t)
% delete(t)